Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class BuildTypeConverter(val target: KClass<*>)

Generates a TypeConverter bean pair between the annotated enum (or sealed interface of data objects) and target: one per direction, mapped member by member.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class BuildTypeGenerator(val source: KClass<*>, val key: String = "")

Generates a TypeGenerator bean for the annotated wrapper type: a class with a single constructor property, such as a @JvmInline value class. The bean wraps every value generated by source.

Link copied to clipboard
annotation class CsvColumn(val name: String)

Reads this property from the CSV column name instead of the column named after the property.

Link copied to clipboard
annotation class CsvIgnore

Leaves this property out of the CSV row; on a DomainEntity, it must have a default value, which the create command then uses.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class CsvImport

Generates a CsvRowMapper for the annotated class, which reads one CSV row into it.

Link copied to clipboard
annotation class DomainCreate(val type: KClass<*> = Unit::class, val property: String = "")

Adds this constructor property to the generated create command of its DomainEntity, named Create{Entity}: a plain data class, with no annotations. An entity without such properties has no create command.

Link copied to clipboard
annotation class DomainCreateGenerated(val key: String = "")

Marks a constructor property as generated by the application on creation instead of user-supplied.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class DomainEntity

Marks a data class as a root entity.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class DomainEntityProjection(val entity: KClass<*>)

Marks a data class as a read-only projection of entity, which must be a DomainEntity.

Link copied to clipboard
annotation class DomainUpdate(val type: KClass<*> = Unit::class, val property: String = "")

Adds this constructor property to the generated update command of its DomainEntity, named Update{Entity}, as a PatchField that defaults to PatchField.Unset. An entity without such properties has no update command.

Link copied to clipboard
annotation class DomainUpdateGenerated(val key: String = "")

Marks a constructor property as generated by the application on update instead of user-supplied.

Link copied to clipboard

How the child rows of a managed PersistenceJoinMany group are reconciled on update when the collection is supplied (not dev.buijs.stratastax.entity.core.api.PatchField.Unset).

Link copied to clipboard
annotation class PersistenceColumn(val reference: String)

Marks a constructor parameter as backed by a database column.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class PersistenceEntity(val table: String = "")

Declares the default table of a class so its PersistenceColumn references can omit the table.

Link copied to clipboard
annotation class PersistenceGenerated

Marks a constructor property as generated by the database on insert instead of user-supplied.

Link copied to clipboard
annotation class PersistenceId

Marks a constructor property as the identity field of the entity.

Link copied to clipboard
annotation class PersistenceJoinMany(val foreignKey: String)

Marks a constructor property as a to-many relation (1:N) through a foreign key of the target.

Link copied to clipboard
annotation class PersistenceJoinManyThrough(val foreignKey: String, val targetForeignKey: String)

Marks a constructor property as a to-many relation (M:N) through a junction table.

Link copied to clipboard
annotation class PersistenceJoinOne(val foreignKey: String)

Marks a constructor property as a to-one relation (N:1 or 1:1) through a foreign key of this entity.

Link copied to clipboard
annotation class PersistenceManageChildren(val updateStrategy: OneToManyUpdateStrategy = OneToManyUpdateStrategy.UPSERT)

Manages the target rows of a relation as owned children: they are created, updated, and deleted together with this entity.

Link copied to clipboard

Manages only the relation link, never the target rows.

Link copied to clipboard

Marks a constructor property as the soft-delete column of the entity.

Link copied to clipboard
annotation class PersistenceVersion

Marks a constructor property as the optimistic-locking version field of the entity.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class RestEntity(val read: KClass<*> = Unit::class, val readAll: KClass<*> = Unit::class, val create: KClass<*> = Unit::class, val update: KClass<*> = Unit::class)

Declares the REST DTO types of a DomainEntity: the response DTO of one entity (read) and of a page of entities (readAll), and the request DTO of its creation (create) and update (update).

Link copied to clipboard
annotation class RestProperty(val name: String = "", val type: KClass<*> = Unit::class)

The REST DTO property of this property or parameter, when it differs from the domain: in the response DTO and in the request DTOs alike. Without it, a response DTO property has the name of the entity property, and a request DTO property the name of the command property it is written to.

Link copied to clipboard
annotation class SearchFilter(val alias: String = "")

Marks a constructor property as filterable by the caller.

Link copied to clipboard
annotation class SearchFixedFilter(val value: String)

Applies an always-on filter property == value that the caller cannot see or override.

Link copied to clipboard
annotation class SearchSort(val tiebreaker: Boolean = false, val direction: SortDirection = SortDirection.ASC)

Marks a constructor property as sortable.